// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(77,1) == 0;
	question = "special";
	text1 = "You enter Kayar's Spire, the main research hall for the Shapers of the Dera Reaches. It is all underground, so that it could be easily, quickly, and permanently sealed off in case of an accident.";
	text2 = "It is incredibly hot and humid down here. It is also different from the other laboratories you have been in. The places where Shapers do their work are generally kept as clean and antiseptic as possible.";
	text3 = "Kayar's Spire is full of the smells of unwashed creations and blood. And decay. The air is full of clanging and the hissing of steam, mixed with the angry roars of almost-rogue monsters penned up here.";
	text4 = "As you enter, the human guards at the gate spot you. They point and shout an alarm. All you can wonder now is how quickly the news of your assault will spread through the Dera Reaches.";
	action = SET_SDF 77 1 1;
	code =
		if (gf(100,4) != 2) 
			sf(77,8,1);
			else rs(4);
	break;
	
begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(77,2) == 0;
	question = "special";
	text1 = "This dome is ringed with crystals, each taller than you, each full of magical energy. Well, all of them except the one that exploded. Filling a stone with power is an effective way to determine if it has flaws that were not detected.";
	text2 = "This is the source of power for the complex. Energy flows from the stones into brightly glowing conduits and, from there, into the rest of the laboratory, to be used for anything from manipulating essence to cooking food.";
	text3 = "A saboteur might be able to do a lot of damage here. It would depend on what safety mechanisms the Shapers put in place.";
	action = SET_SDF 77 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(77,3) == 0;
	question = "special";
	text1 = "This is one of the many storerooms in the complex. It doesn't look like anything valuable is kept back here.";
	text2 = "One thing does get your attention, though. There is a long, polished crystal on a table at the back of the room. It is covered with dust, but not enough to hide the fact that it glows slightly.";
	action = SET_SDF 77 3 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(77,4) == 0;
	question = "special";
	text1 = "You enter a shielding ring. This is the sort of buffer zone Shapers generally put around places where particularly intense experiments are taking place.";
	text2 = "Then, if something goes horribly wrong with an act of creation, the Shapers outside the lab have a few more seconds to shut the blast doors and seal the mess inside forever.";
	action = SET_SDF 77 4 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = get_sdf(77,5) == 0;
	question = "special";
	text1 = "This is the core of Kayar's Spire, where the serious work here takes place. This is where the Purity Agent is being crafted.";
	text2 = "At the far southern end of the hall, there is a swirling pool of red essence. It looks similar to the Geneforge, but the power radiating out of it is far different. A shield of glowing energy surrounds it, keeping the air out.";
	text3 = "There are four crystal spires, each full of power. Four conduits connect them to the pool. When it is time for the final act of Shaping to take place, a huge discharge of energy will be used.";
	text4 = "Beakers sit on a table behind the pool, ready to store the final products of Sage Taygen's experiment.";
	text5 = "The one thing that is missing is the controls. From where you are standing, you can't see where the machinery is operated from.";
	action = SET_SDF 77 5 1;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = get_sdf(77,6) == 0;
	question = "special";
	text1 = "This is a small library, packed with scrolls and lab journals. You take one and inspect it. Then another. They are very strange books.";
	text2 = "Each section begins with an entry, like, 'Fyora, Type 112, Generation 17, Section 1302.'";
	text3 = "This is followed by a long section of gibberish. The same four letters, in a seemingly random pattern. This goes on, in tiny, tiny writing, for pages.";
	text4 = "None of it makes any sense. The Shapers here must be mad. You replace the book on the shelf.";
	action = SET_SDF 77 6 1;

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This is a fairly simple device. It has a few dials and an eyepiece. The eyepiece is attached to a long tube, which points at the Shaping pedestal. You peer through the eyepiece and see a bit of flesh on the pedestal. It looks ordinary, at first.";
	text2 = "Then, as you watch, the view moves closer to the meat. And closer. And closer. A bit of scale fills the view. But then, amazingly, you look closer still. The device magnifies the skin, so that you can see every tiny detail.";
	text3 = "Then you get even closer. You see that the skin is made of countless tiny sacs, attached to each other. Each living thing is composed of countless numbers of these tiny blocks. Then the view plunges into one of the sacs.";
	text4 = "Inside, you see ... you don't know what. It looks like a pair of scrolls, twined together in a spiral. The view travels along the spiral. It's incredibly long, and it seems to contain some sort of information. You can't understand it.";
	text5 = "Finally, you stumble back, dazed. You have no idea what you have just seen. It is amazing and bizarre. It's as if you have just, aided by magic, seen something secret, some key element of life and how it works. And how it can best be altered.";
	text6 = "It is incredible, and horrifying. The Shapers here have done something you would not have thought possible. They have come up with a way to refine their work, and they are using it to make something never dreamt of before.";
	text7 = "Finally, you stumble back, dazed. Even though you have seen it before, the magnifying machine has lost none of its ability to amaze you.";
	code = 
		if (get_flag(77,7) == 0) {
			remove_string(7);
			set_flag(77,7,1);
			}
			else {
				remove_string(5);
				remove_string(6);
				}
	break;	
	
begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = get_sdf(77,1) == 0;
	question = "special";
	text1 = "You enter Kayar's Spire, the main research hall for the Shapers of the Dera Reaches. It is all underground, so that it could be easily, quickly, and permanently sealed off in case of an accident.";
	text2 = "It is incredibly hot and humid down here. It is also different from the other laboratories you have been in. The places where Shapers do their work are generally kept as clean and antiseptic as possible.";
	text3 = "Kayar's Spire is full of the smells of unwashed creations and blood. And decay. The air is full of clanging and the hissing of steam, mixed with the angry roars of almost-rogue monsters penned up here.";
	text4 = "Fortunately, nobody has as yet witnessed your invasion of Sage Taygen's most secure and secret fortress. If anyone sees you, news of your actions will probably spread quickly through the Dera Reaches.";
	action = SET_SDF 77 1 1;
	code =
		if (gf(100,4) == 2)
			rs(4);
	break;

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You are experiencing a real good-news bad-news situation. On the bright side, the unpredictable new form of life you have created, too small to see, is not instantly fatal.";
	text2 = "Alas, in high concentrations, it makes you feel extremely ill. You frequently double over in agony, as you are blasted by waves of nausea and abdominal pain.";

begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "When you get close to the exit door, it doesn't open. What you did to the Purity Agent vat must have caused some automatic system to seal the exit.";
	text2 = "There must be a way to unseal the door. Hopefully it is inside Kayar's Spire and not outside.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This device looks like it is here to finely tune the power flow to the pool to the south. It doesn't have any controls.";
	text2 = "You do note, however, that the power conduit you obtained in the Shadow Road has been installed into it.";
	code =
		if (gf(64,7) < 9)
			rs(2);
	break;
	
begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You hear a hum in the distance. The glowing crystals and conduits of the Spire grow brighter.";
	text2 = "Someone has managed to turn the power back on.";
	
begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Sage Taygen sees you. _You! You have come after me!_ He is both pleased and horrified to realize that his paranoid fantasies are coming true.";
	text2 = "_You will not be able to slay me, though. I have developed a new sort of creation, and I have been eager to try it out. You can hunt a member of the Council, but you will not bring him down!_";
	
begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "You have finally hunted down and slain Sage Taygen. In the final moments of his life, he collapses and starts to whimper.";
	text2 = "He presses his hands against his stomach, as if trying to hold the last fragments of his life in. Then he whispers, _Leena._ And then he dies.";
	text3 = "The mad Shaper of the Dera Reaches is gone.";
	text4 = "You have killed a member of the Shaper Council. You have permanently earned the hatred of the Shapers and their allies.";
	code =
		if (gf(100,11) == 0) 
			sf(100,11,1);
			else rs(4);
	break;
	
begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Not surprisingly, practically all of the guards in Kayar's Spire are human. The sounds and smells would quickly drive even a fairly stable creation rogue.";
	text2 = "Of course, the guards aren't too comfortable about the situation either. They look constantly pale and terrified. One of them tells you, _We can't talk. We're supposed to send you to Agent Caluma. Southeast lab._";
	
begintalknode 16;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a row of creations here, waiting to be used in the experiments here. They are well restrained, which is good, because they are all one loud noise from going completely rogue.";	
	
begintalknode 17;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several researchers in this wing. All highly skilled outsider humans, all very cold and high-strung. The work here seems to have had a strong effect on them.";
	text2 = "They don't want to talk. They answer your questions in unhelpful, monosyllabic responses.";
	text3 = "Finally, one of them says, _We are only the workers here. You need Agent Caluma. In the main lab. Southeast quadrant._";
	
begintalknode 18;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Agent Caluma has several outsider assistants working with her. They don't speak with you. They defer to the Shapers in all things.";	
	
begintalknode 19;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You try to talk to Agent Caluma, but she is despondent. _No ... Lost. All lost. How will I explain this to Taygen ..._";
	text2 = "She turns on you. _You. You are the one who failed us. Go. Go now and leave us be. Return to Taygen and honorably accept your punishment._";
	
// PWR CNTRL

begintalknode 20;
	state = -1;
	nextstate = 20;
	condition = 1;
	question = "Name";
	text1 = "There is a lot of power running to this complex, and it needs a big machine to control it. The huge conduits run through the base of this huge device.";
	text2 = "There are surprisingly few controls at the base. They mainly determine the amount of power that flows through the conduits.";
	text3 = "The controls are currently dormant. Everything has been temporarily shut down.";
	text4 = "When you get close to the controls, sparks start to shoot out. A temporary sealing spell has been placed upon them, so that nobody can muck about with them while the Shapers look for problems in the system.";
	code =
		rs(3);
		rs(4);
		if (gf(77,10) == 1)
			as(3);
		if (gf(77,10) == 2)
			as(4);
	break;
	
begintalknode 21;
	state = 20;
	nextstate = -1;
	condition = gf(77,10) == 0 && gf(77,9) == 0;
	question = "Turn off the power.";
	text1 = "You try to manipulate the controls, only to rapidly find that they have been locked in place.";
	action = SET_SDF 77 9 1;
	
begintalknode 22;
	state = 20;
	nextstate = -1;
	condition = gf(77,10) == 0 && gf(77,9) == 0;
	question = "Send a power surge through the system.";
	text1 = "You try to manipulate the controls, only to rapidly find that they have been locked in place.";
	action = SET_SDF 77 9 1;
	
begintalknode 23;
	state = 20;
	nextstate = -1;
	condition = gf(77,9) == 1 && get_stat(21) < 13;
	question = "Try to unlock the controls. (Use 3 living tools.)";
	text1 = "The controls are simple. When you open the hatch, however, you find that the works inside are mind-bogglingly complex. You completely fail to comprehend them.";
	action = END_TALK;
	
begintalknode 24;
	state = 20;
	nextstate = -1;
	condition = gf(77,9) == 1 && get_stat(21) >= 13;
	question = "Try to unlock the controls. (Use 3 living tools.)";
	text1 = "You don't have enough living tools.";
	text2 = "The controls are simple. When you open the hatch, however, you find that the works inside are mind-bogglingly complex. Fortunately, you are able to comprehend them.";
	text3 = "Some sweat, some tinkering, and three incinerated living tools later, the controls are moving again.";
	code =
		if (num_of_item(255) < 3) {
			rs(2); rs(3);
			}
			else {
				rs(1);
				take_num_of_item(255,3);
				sf(77,9,2);
				award_party_xp(100,30);
				}
	break;
	
begintalknode 25;
	state = 20;
	nextstate = -1;
	condition = gf(77,9) == 2 && gf(77,10) == 0;
	question = "Turn off the power.";
	text1 = "With a simple, swift move, you cut off the power flow to the conduits. You can put in a safety mechanism to keep the power flow from getting too high, but not too low.";
	text2 = "You immediately hear shouts of alarm coming from the south. This is followed by angry ranting. You can't make out the exact words, but the speakers are slowly getting closer. Someone is coming to restore the power.";
	text3 = "Sadly, this blatant sabotage is going to be discovered. When Sage Taygen realizes what happened soon after you entered Kayar's Spire, his paranoia will work to your great disadvantage.";
	code =
		sf(77,10,1);
		if (gf(100,4) == 2) {
			sf(100,4,3);
			sf(77,8,1);
			}
			else rs(3);
		if (gf(77,11) > 0)
			rs(2);
	break;
	
begintalknode 26;
	state = 20;
	nextstate = -1;
	condition = gf(77,9) == 2 && gf(77,10) == 0;
	question = "Send a power surge through the system.";
	text1 = "Sadly, your attempt to burn out the whole complex with one searing jolt of energy is not successful. There are apparently safety mechanisms in place to prevent it. You aren't sure if they are even in a place where you can reach them.";
	
begintalknode 27;
	state = 20;
	nextstate = -1;
	condition = gf(77,9) == 2 && gf(77,10) == 1;
	question = "Turn the power back on.";
	text1 = "This is easy to do. You flip the switch back. The power flow resumes. Of course, who knows how much damage this brief interruption of energy did to the experiments taking place here.";
	code =
		sf(77,10,0);
	break;
	
begintalknode 28;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "Leave the device alone.";
	text1 = "You have nothing else to do here. You leave.";
	action = END_TALK;

	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "You find another clear sign that Kayar's Spire is not as well-maintained as other Shaper workshops. This is the relay that sends the signals to the doors to close in case of an accident.";
	text2 = "Sensors point out of it in all directions, set to detect great heat, excessive magical energy, or unusual amounts of essence in the area. If something is found, slam. The area is sealed off.";
	text3 = "The sensors are still broken. Nobody has detected your sabotage.";
	code =
		 if (gf(77,12) == 0)
		 	rs(3);
	break;
		
begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = gf(77,12) == 0;
	question = "Make the doors close.";
	text1 = "A little bit of magic generates enough heat to set off the sensors. You hear the doors shut, sealing you in.";
	text2 = "A few days later, the doors are opened. First, Sage Taygen, to make sure that nothing nasty has been let loose in here, uses controls elsewhere to flood this section with great heat and energy. You are pretty much killed.";
	action = END_TALK;
	code =
		erase_char(1000);
	break;

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = gf(77,12) == 0;
	question = "Sabotage the device.";
	text1 = "For once, this machinery is simple and easy to understand. Little wires extend from the sensors into the core of the device. You carefully unhook each one.";
	text2 = "Until someone bothers to check the device (which, based on the amount of dust, doesn't happen often), it won't work.";
	action = END_TALK;
	code =
		sf(77,12,1);
	break;
	
begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Leave the device alone.";
	text1 = "There is nothing else you can do here. You leave.";
	action = END_TALK;

// main cntrls

begintalknode 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "";
	text1 = "You examine the control creature in this stone cradle. It is here to control the final creation of the Purity Agent.";
	text2 = "The Agent in charge of the experiment is, fortunately, a very, very organized person. The controls are clearly labeled";
	text3 = "One of them says, _Charge Conduits._ One of them says, _Drain Power Conduits._ One says, _Emergency Dump._ And one says, _Energize Essence._";

begintalknode 41;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Flip the 'Charge Conduits' switch.";
	text1 = "You hear a clunk. Then you hear a long squeal, increasing in pitch. Your hair starts to stand on end. You look to the west. The conduits are glowing much more brightly.";
	text2 = "You hear a clunk. Nothing else happens.";
	text3 = "Nothing happens. Not even a clunk. The power must still be off.";
	action = END_TALK;
	code =
		clear_strings();
		if (gf(77,10) == 1)
			as(3);
			else if (gf(77,13) > 0)
				as(2);
				else {
					sf(77,13,1);
					as(1);
					}
	break;
	
begintalknode 42;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Flip the 'Drain Power' switch.";
	text1 = "You hear a clunk. Then you hear a long squeal, decreasing in pitch. The energy in the air fades. You look to the west. The conduits are glowing less brightly.";
	text2 = "You hear a clunk. Nothing else happens.";
	action = END_TALK;
	code =
		clear_strings();
		if (gf(77,13) == 0)
				as(2);
				else {
					sf(77,13,0);
					as(1);
					}
	break;

begintalknode 43;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Flip the 'Emergency Dump' switch.";
	text1 = "You flip the switch. You hear gurgling and hissing. A valve opens at the bottom of the vat in the main hall, and years of hard work disappears down the drain.";
	text2 = "The ambitious Purity Agent experiment may not have been ended permanently, but it will take lots of time and work to repair the damage you have done.";
	text3 = "Sage Taygen is going to be furious. If he finds out that you are responsible, he will hold a grudge.";
	action = END_TALK;
	code =
		sf(100,17,1);
		award_party_xp(200,30);
		kill_object(114,0);
		sf(100,4,3);
		
		sf(77,29,0);
	break;
	
begintalknode 44;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Flip the 'Energize Essence' switch.";
	text1 = "The crystals outside let out a long, low hum. The whole chamber vibrates. You feel faint. The room grows very hot. And then a long, powerful jolt of power travels down the conduits and into the Purity Agent pool.";

	text4 = "You hear an alarm. Moments after that, the safety doors slam shut, trapping you in here with the Agent. You begin to feel violently ill. The Purity Agent, even in its weak form, is lethal in high enough concentrations ...";
	text5 = "You hear an alarm, but the safety doors don't shut. You start to feel ill. The Agent is starting to spread through the air. Who knows how far it will get? Or what effect it will have when it escapes Kayar's Spire ...";
	action = END_TALK;
	code =
		sf(100,21,1);
		award_party_xp(200,30);
		sf(100,4,3);
		if (gf(77,12) == 0) {
			rs(5);
			erase_char(1000);
			}
			else rs(4);

		sf(77,29,0);
	break;
		
begintalknode 45;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Leave the controls alone.";
	text1 = "This thing could be really dangerous. You don't do anything else.";
	action = END_TALK;
	
begintalknode 47;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "You try to use the control creature, but Agent Caluma leaps forward and slaps your hand away.";
	
begintalknode 48;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "You try to use the control creature, only to find that it is dead. The flawed Purity Agent has killed it.";
	
begintalknode 49;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "You try to use the control creature, but it is dormant. It doesn't respond to your pokes.";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "There is a servant mind safely hidden in this chamber, a fair distance from any experiments that might damage it. It looks up at you as you approach. You realize that it does not look well.";
	text2 = "It stares at you vacantly. Dried spittle has caked up at the corners of its mouth. It says, very slowly, _I am Mind Controller. Wait for command._";
	text3 = "Then it mutters to itself silently. You can't understand what it says.";
	text5 = "Mind Controller lies in its tray and mutters to itself. It doesn't seem to be able to communicate well. Or, you suspect, to think.";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = 51;
	condition = 1;
	question = "What is your purpose here?";
	text1 = "_I ... Commands. Await commands._";
	text2 = "It makes a pained gurgling noise. The Purity Agent seems to be affecting it.";
	code =
		if (gf(100,21) == 0)
			rs(2);
		break;

	
begintalknode 52;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "What sort of commands?";
	text1 = "_Com ... Com ... Commands._";
	
begintalknode 53;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "What do you control here?";
	text1 = "_Control ... Little. Little control. Maintenance. Food. Doors. Little control. Now._";
	
begintalknode 54;
	state = 50;
	nextstate = 52;
	condition = 1;
	question = "What is wrong with you?";
	text1 = "It starts to speak clearly for a short time. A memorized response to a request for status. _I have been reduced to low functionality. This was deemed best for the security of Kayar's Spire and the completion of its work._";
	text2 = "_Please direct all queries to a non-creation in authority._";
	
begintalknode 55;
	state = 52;
	nextstate = -1;
	condition = 1;
	question = "Why are you at low functionality?";
	text1 = "The creature has little else to say. It just lets out a long, gurgling noise.";
	
begintalknode 56;
	state = 50;
	nextstate = 53;
	condition = gf(77,29) == 0;
	question = "I need to leave this place.";
	text1 = "_Huhhrrrr ... Doors. Control doors._";
	
begintalknode 57;
	state = 53;
	nextstate = 50;
	condition = 1;
	question = "Can you open the doors?";
	text1 = "_I ... Main entry exit is sealed. I ... Unsealing. Door is clear._";
	action = SET_SDF 77 29 1;
	code =
		sf(77,25,1);
	break;
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "That is all I need to know.";
	text1 = "The mind doesn't respond. It just makes gurgling noises.";
	text2 = "It does seem very ill, though. If the Purity Agent doesn't clear from the air soon, it might die.";
	action = END_TALK;
	code =
		if (gf(100,21) == 0)
			rs(2);
		break;

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "You are confronted by an Agent. She is an elder and honored one of her kind. Her armor is gilded and marked with symbols of honor, and her hair is shot through with gray.";
	text2 = "She is also furious. _I am Agent Caluma, mistress of Kayar's Spire! How dare you intrude upon my domain? My instructions are clear. I must deal with you._";
	text3 = "_Do not bother to beg for mercy. You must have known that your life was forfeit when you came here._";

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = gf(101,5) > 0;
	question = "You might as well give in. All is lost.";
	text1 = "_All lost? You murdered Sage Taygen, true. The Purity Agent will probably never be created. But I will do all I can to complete it, and I think I will succeed._";
	text2 = "_First, though, our lord will be avenged!_";
	action = END_TALK;
	
begintalknode 72;
	state = 70;
	nextstate = 71;
	condition = gf(101,5) == 0 && gf(100,21) == 0 && gf(100,17) == 0;
	question = "What are you trying to do here?";
	text1 = "_What? You don't know? All the trouble you have caused, and you do not understand the great act that is taking place?_";
	text2 = "_We are creating the Purity Agent. We will make the world pure again!_";

begintalknode 73;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Actually, I think I will beg. Please don't hurt me. Please. Please.";
	text1 = "Agent Caluma looks disappointed. _At last! After years in this pit, mixing fluids and poking at samples, I was going to get a good, honest combat! And you disappoint me? Quit sniveling!_";
	text2 = "_To your feet! I need to sharpen my skills, grown long dull. It has been too long since I struck down a foe of the Shapers..._";
	action = END_TALK;

begintalknode 74;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Excellent. Now another of Sage Taygen's mad servants will die!";
	text1 = "Agent Caluma holds her hands wide. Lightning flies from them. _At last! After years in this pit, mixing fluids and poking at samples, I get good, honest combat!_";
	text2 = "_Come! It has been too long since I struck down a foe of the Shapers..._";
	action = END_TALK;

begintalknode 75;
	state = 71;
	nextstate = 72;
	condition = 1;
	question = "Pure again? How?";
	text1 = "_Through a Shaping unlike any ever performed before. A disease! A tiny creature that will spread from creation to creation, leaving none living._";

begintalknode 76;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "You are going to kill every creation? Why?";
	text1 = "_Because the Shapers were wrong. We made hosts of creations, but we did not keep them under proper control. They were allowed too much freedom. This war is the result._";
	text2 = "_We must start over. Start anew. Remake all the creations, but more docile. Under better control. This is now the only route to peace._";

begintalknode 77;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "That is a worthwhile project. I would like to help.";
	text1 = "_Really? Are you sincere? It doesn't matter. If you had approached Sage Taygen properly, it might be different. But now ..._";
	text2 = "Agent Caluma holds her hands wide. Lightning flies from them. _Come! It has been too long since I struck down a foe of the Shapers..._";
	action = END_TALK;

begintalknode 78;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "You are mad. I will have to stop you.";
	text1 = "_You are not the first to try. You will not be the last._";
	text2 = "Agent Caluma holds her hands wide. Lightning flies from them. _Come! It has been too long since I struck down a foe of the Shapers..._";
	action = END_TALK;


//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = "You are greeted by an Agent. She is an elder and honored one of her kind. Her armor is gilded and marked with symbols of honor, and her hair is shot through with gray.";
	text2 = "She inspects you with interest. _I am Agent Caluma, mistress of Kayar's Spire. I have heard of the new arrival who completed Sage Taygen's tests. I look forward to your aiding me with my work. When it is time._";
	text5 = "Agent Caluma moves among the control panels, constantly checking readings, pressing buttons, and making notes. The work of making the Purity Agent clearly needs a lot of delicate preparation.";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = 91;
	condition = 1;
	question = "Where are you from?";
	text1 = "_I was born in Lethia Province. I was sent east to fight the rebels. I served with distinction, purging rogues by the hundreds._";
	text2 = "_After Burwood fell, I looked for a place where my skills could be used to make real advances in this war. That was when Sage Taygen found and recruited me. Then he sent me to Kayar's Spire._";

begintalknode 92;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "So you are less a researcher than a warrior?";
	text1 = "_That is true. Sage Taygen is the genius behind the Purity Agent. I follow his instructions and keep discipline. And, occasionally, add a small insight of my own._";

begintalknode 93;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "Sage Taygen recruited you?";
	text1 = "_His great work would not be well-received by the other Shapers. He had to be very subtle in the finding of like-minded Shapers to aid him._";
	text2 = "_Fortunately, my desire to purge the world of rogues, or those at risk of becoming rogues, was well-known among my sect._";

begintalknode 94;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "What is Kayar's Spire?";
	text1 = "_Once, it was the last fortress of the nomads, where they made their final defense against the Shapers. It was blasted to individual stones._";
	text2 = "_Then, three centuries ago, it was built for Shaper research. And allowed to fall into disuse and disrepair. Then Sage Taygen allowed me to rebuild it. And its defenses._";

begintalknode 95;
	state = 90;
	nextstate = 92;
	condition = gf(100,25) == 0;
	question = "Tell me about the Purity Agent.";
	text1 = "_It is almost done. The proper substances are in place. The most basic and necessary creation samples are in the vat. Soon, it will be time._";

begintalknode 96;
	state = 92;
	nextstate = 93;
	condition = 1;
	question = "Why do you need creation samples?";
	text1 = "_I do not entirely understand. As Sage Taygen explains it, when the Purity Agent creature is being Shaped, it needs to be exposed to the essence of its targets, so it will know what to destroy._";
	text2 = "_Thus, we have brought many creations here and taken samples from them, in the hunt for the samples that will give the Purity Agent the best set of targets._";

begintalknode 97;
	state = 92;
	nextstate = -1;
	condition = gf(64,7) < 11;
	question = "What must be done now?";
	text1 = "_You must return to Sage Taygen and do whatever he tells you._";

begintalknode 98;
	state = 93;
	nextstate = -1;
	condition = 1;
	question = "Is there anything missing?";
	text1 = "_Sadly, we have obtained very few drakon samples. The Purity Agent will destroy all of their servants, but it will probably do little to the drakons themselves._";
	text2 = "_Unless we are lucky, they will have to be killed the old-fashioned way._";

begintalknode 99;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "Can I get some training?";
	text1 = "_I am a warrior, not a trainer. Go back to the Zephyr Oasis for training._";

begintalknode 100;
	state = 90;
	nextstate = -1;
	condition = gf(64,7) < 11 && gf(100,25) == 0;
	question = "How can I help you?";
	text1 = "_You can't. Go back to Sage Taygen for instructions. And leave me be. I have very much to do. We will meet again soon._ She returns to work.";
	action = END_TALK;
	
begintalknode 101;
	state = 90;
	nextstate = 95;
	condition = gf(64,7) == 11 && gf(100,25) == 0;
	question = "I am ready to help complete the Purity Agent.";
	text1 = "_Are you sure? This is a very unpredictable process. Be sure that you are at full strength._";
	text2 = "";

begintalknode 102;
	state = 95;
	nextstate = -1;
	condition = 1;
	question = "I need a little more time.";
	text1 = "_All right. Return when you are ready._";
	action = END_TALK;

begintalknode 103;
	state = 95;
	nextstate = -1;
	condition = 1;
	question = "I am ready.";
	text1 = "_Then I will begin the process. Go to the north end of the hall and stand guard. For some time now, the other members of the Council have suspected what we are doing. They may try to act._";
	text2 = "She thinks for a moment. _You might need more help. If necessary, you might be able to convince Commander Thorl to send aid._";
	text3 = "She turns to the controls. _Now, go. Be ready. The great work is about to begin._";
	action = END_TALK;
	code =
		sf(77,15,1);
		sf(77,25,0);
		sf(77,29,0);
		
		set_act_at_dist(32,1);
		set_act_at_dist(33,1);
		set_act_at_dist(34,1);
		set_act_at_dist(35,1);
		
		if (get_stat(20) < 12)
			rs(2);
	break;
	
begintalknode 104;
	state = 90;
	nextstate = -1;
	condition = gf(100,25) > 0;
	question = "What must be done now?";
	text1 = "_Return to Sage Taygen and do what he tells you. I thank you. Our work here is done._";
	action = END_TALK;
	
begintalknode 105;
	state = 90;
	nextstate = 97;
	condition = gf(100,4) == 2 && gf(100,8) == 0;
	question = "I have a control tool in my chest.";
	text1 = "Agent Caluma has you show it to her. She nods. _I have studied these creatures. Part of the research for the Purity Agent. Shaper Rawal has not improved the design. My knowledge is not out of date. I can remove it._";
	text2 = "_However, it will be difficult. And extremely painful. Are you sure that you want to take the risk? Remember, as long as you stay far from Rawal, he will not be able to control you._";
	
begintalknode 106;
	state = 97;
	nextstate = 90;
	condition = 1;
	question = "Never mind.";
	text1 = "_Perhaps wise. What else do you want to discuss?_";
	
begintalknode 107;
	state = 97;
	nextstate = -1;
	condition = 1;
	question = "I am ready. Get this thing out of me.";
	text1 = "Agent Caluma directs you to the stone table in a side room. You lie on it. She restrains you with ropes. _Please try to be calm. This is going to be agonizingly painful._ Her bedside manner leaves something to be desired.";
	text2 = "She bares your chest and extends a pale hand with long, delicate fingers. She touches the tool and concentrates for a moment. The tool lets out a long, shrill squeal. Then it shrivels up.";
	text3 = "It is more or less at this point that the agony starts. You feel as if a massive hand is squeezing your chest. You life blood leaks out through a tiny hole in your heart.";
	text4 = "But Caluma is prepared. With a smooth motion, she slides the tool out of you, being careful not to leave any bits behind. Then she puts a hand on the hole, concentrates, and Shapes you. The hole in your heart closes. The wound seals up.";
	text5 = "Then she unties you. _You will need some time to recover. I feel fortunate. I am not the best Shaper for such procedures. But you were sent to me ..._ She shrugs.";
	text6 = "With a contemptuous flip of her hand, she throws the tool into the trash. You feel horribly weak, but you are free.";
	action = END_TALK;
	code =
		sf(100,8,1);
		alter_stat(3,-1);
		award_party_xp(100,20);
	break;
	
////

// 110


begintalknode 110;
	state = -1;
	nextstate = 110;
	condition = 1;
	question = "Name";
	text1 = "There is a guardpost here, outside the main workshop of the Spire. You greet the commander, a scarred veteran of many campaigns.";
	text2 = "When he sees you, he cracks his knuckles, revealing the artila acid burns on his hands. _I am Commander Thorl. What do you want?_";
	text5 = "Commander Thorl looks you over. His expression of mistrust doesn't surprise you. All you ever get are the suspicion of outsiders and the contempt of Shapers.";
	action = INTRO;

begintalknode 111;
	state = 110;
	nextstate = 111;
	condition = gf(77,15) != 1;
	question = "What are you doing here?";
	text1 = "His great reluctance to talk to you becomes apparent. _We are standing guard._";
	
begintalknode 112;
	state = 111;
	nextstate = -1;
	condition = 1;
	question = "Over what?";
	text1 = "He points to the east. _The main lab is in there. Agent Caluma is there. She's the one you should talk to._";

begintalknode 113;
	state = 111;
	nextstate = 112;
	condition = 1;
	question = "What are you guarding against?";
	text1 = "_Anyone who attacks us._";
	
begintalknode 114;
	state = 112;
	nextstate = -1;
	condition = 1;
	question = "And have you been attacked recently?";
	text1 = "_We've had to deal with the odd infiltrator, yes._ He doesn't give any more details.";
	
begintalknode 115;
	state = 110;
	nextstate = -1;
	condition = 1;
	question = "I need some information.";
	text1 = "He points to the east. _Our instructions are clear. All dealings with you happen through Agent Caluma._";
	
begintalknode 116;
	state = 110;
	nextstate = 113;
	condition = gf(77,15) == 1 && gf(77,20) == 0;
	question = "I need your help to defend the lab.";
	text1 = "_We know something is happening. An attack might be coming. But we have to stay here. That's our orders. Watch the west entrance._";
	
begintalknode 117;
	state = 113;
	nextstate = -1;
	condition = 1;
	question = "I order you to help me. I need defenses closer to where the Shaping is.";
	text1 = "He looks annoyed. _You are not one to order me around. I'm doing my job. You go do yours._ He turns and watches the western corridors.";
	action = END_TALK;
	
begintalknode 118;
	state = 113;
	nextstate = -1;
	condition = get_stat(20) >= 12;
	question = "We need defenses closer to where the Shaping is. If we fail, you will have to answer to the Shapers.";
	text1 = "This gets his attention. He knows how unstable Sage Taygen is. He says, _Is the experiment going on that serious?_ You nod.";
	text2 = "_All right. We'll move east. A little bit. But if we miss anyone because we abandoned our posts, we'll make sure you get the blame._";
	action = END_TALK;
	code =
		sf(77,20,1);
		award_party_xp(100,30);
		set_act_at_dist(1004,1);
	break;
	
////
	
begintalknode 130;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You hear a deep humming sound. The stone vibrates under your feet. The crystals in the main Shaping hall are starting to come to life.";
	
begintalknode 131;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Alarms sound all throughout the complex. This is expected. Everyone is being alerted that a major act of magic is about to take place. The sounds from the crystals grow louder.";
	text2 = "No doubt, somewhere, massive doors are slamming shut, to protect the rest of the world in case something goes wrong.";
	
begintalknode 132;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The humming sound begins to vary widely, as Agent Caluma increases and decreases the power. She carefully charges the pool of bubbling essence. The act of Shaping has begun.";	
	text2 = "But then something goes wrong. You hear shouting. And fighting. The sound is coming from the northeast.";
	text3 = "Agent Caluma shouts, _I knew it! I knew they had spies here! Keep them safely away. Kill them. I need to complete the work._";
	
begintalknode 133;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The work of Shaping continues. Sadly, it is not the sort of thing that can be hurried. You hear more shouts (and a few roars) in the distance.";	
	
begintalknode 134;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sound of machinery being smashed echoes through the complex. The invaders are trashing the laboratory. If they are not stopped, all of the work here will be for naught.";	
	
begintalknode 135;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The machinery has taken too much damage. You hear the sounds of the equipment powering down. Agent Caluma has failed to create the Purity Agent. It will take years to replace what has been lost. If that is possible at all.";	
	code =
		sf(100,17,1);
		sf(77,25,1);
		sf(77,29,1);
		sf(77,15,2);
	break;
	
begintalknode 136;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You return to the pool, now that the attackers have been turned back. The crystals have been drained of power. The conduits are dim. The pool is not bubbling.";
	text2 = "However, something has changed. A thin layer of black scum floats on top. Fortunately, the magical shield around the pool is intact.";
	text3 = "Agent Caluma emerges and inspects the pool. She nods. Then she gets a pair of tongs and several beakers. She extends the beakers through the shield and collects samples of the goo. The beakers are sealed.";
	text4 = "Her assistants take the beakers away, no doubt to be hidden very well.";
	text5 = "Agent Caluma turns to you. _You did well. It was a close thing, but the work was created. Now it is in a safe place, until the Council says it can be used. Now return to Sage Taygen. He will decide how to proceed from here._";
	
begintalknode 137;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Agent Caluma has fallen. The controls she was using are smashed. You have failed to create the Purity Agent. It will take years to replace what has been lost. If that is possible at all.";	
	code =
		sf(100,17,1);
		sf(77,25,1);
		sf(77,29,1);
		sf(77,15,2);
	break;	
	
begintalknode 138;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The assistants are not currently free to talk as they are working on keeping everything from exploding.";
	
begintalknode 139;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The assistants are busy mourning the loss of years of work. They look at you with pure loathing.";		
	
begintalknode 140;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You have been sighted spying in Kayar's Spire. Should word of this get back to Sage Taygen, and it probably will, you will be likely to receive an unfriendly reception in the Zephyr Oasis in the future.";		
	
begintalknode 141;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are delicate pieces of machinery and Shaped controls all over the place. You have no idea what most of them do.";		
	
begintalknode 142;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The halls have become very quiet and peaceful. The intruders have been destroyed. Perhaps it is time to return to Caluma's laboratory and see what else needs to be done.";		

//

// 150

begintalknode 150;
	state = -1;
	nextstate = 150;
	condition = 1;
	question = "Name";
	text1 = "You approach one of the formerly imprisoned serviles. _You are finally here. You took too long. We can be found at any moment._";
	text2 = "_Sage Taygen is here. We have heard. He hides in the laboratory in the northwest. Are you ready to attack?_";


begintalknode 151;
	state = 150;
	nextstate = -1;
	condition = 1;
	question = "I only need a little more time.";
	text1 = "_Then hurry. You must hurry. We will be found soon, and then all is wasted._";
	action = END_TALK;
	
begintalknode 152;
	state = 150;
	nextstate = -1;
	condition = 1;
	question = "All right. Let's begin the attack.";
	text1 = "_Then help. I do not think the strength to kill Taygen is here without help. Come. We go._";
	action = END_TALK;
	code =
		set_attitude(71,3);
		set_attitude(72,3);
		set_attitude(73,3);
		set_attitude(74,3);
	
		sf(77,21,1);
	break;